export default {
    data() {
        return {
            student: {
                name:"",
                sex:"",
                studentNumber:"",
                grade:"",
                profession:"",
                school:"",
                role:"",
                IDcard:"",
                cellPhone:"",
                email:"",
                nativePlace:"",
                idNumber:"",
                phoneNumber:""
            },
        }
    },
	created() {
		this.$axios({
		  method: "get",
		  url: "/queryStudentUserById/"+localStorage.getItem("userId"),
		  headers: { "Content-Type": "application/json" },
		}).then((res) => {
//			 console.log(res.data.data[0])
			  this.student.phoneNumber=res.data.data[0].phoneNumber;
			 
			 this.student.idNumber=res.data.data[0].idNumber;
			 //籍贯
			 this.student.nativePlace=res.data.data[0].nativePlace;
			 this.student.email=res.data.data[0].email;
			 this.student.name=res.data.data[0].name;
			 this.student.sex=res.data.data[0].sex;
			 this.student.studentNumber=res.data.data[0].id;
			 this.student.grade=res.data.data[0].grade;
			 this.student.profession=res.data.data[0].major;
			 this.student.school=res.data.data[0].college;
			 this.student.role=res.data.data[0].politicalOutlook;
			 this.student.IDcard=res.data.data[0].idNumber;
			 this.student.cellPhone=res.data.data[0].phoneNumber;
		  }).catch((e) => {
		    console.log(e);
		  });
	},
}